revXMLInsertNode
Type
command
Summary
Inserts a node as a sibling of siblingNode in the specified tree.
Syntax
revXMLInsertNode <treeId>, <siblingNode>, <nodeName>, <contents>, [<location>]
Description
Use revXMLInsertNode to insert a node into an XML tree.
The revXMLInsertNode command is part of the XML library. To ensure that the command works in a standalone application, you must include this custom library when you create your standalone. In the Inclusions pane of the Standalone Application Settings window, make sure the "XML" checkbox is checked.
Parameters
Name | Type | Description |
---|---|---|
treeId | The number returned by the revXMLCreateTree or revXMLCreateTreeFromFile function when you created the XML tree. | |
siblingNode | The node the new node will have as sibling after insertion. | |
nodeName | The name of the new node. | |
contents | The text to place in the new node. | |
location | If location is not present or is equal to "after", the node will be added as the next sibling of siblingNode. If location is "before" then the node will be added as the previous sibling of siblingNode. |
Examples
revXMLInsertNode tTreeId, "sister", field "Name", field "Contents", "before"
Related
command: revXMLAppend
function: result
glossary: LiveCode custom library, Standalone Application Settings, standalone application, command
library: XML library
Compatibility and Support
Introduced
LiveCode 2.7.4
OS
mac
windows
linux
ios
android
Platforms
desktop
server
mobile